package com.solution.delegate;

import com.solution.exception.DelegateException;
import com.solution.exception.ServiceBeanException;
import com.solution.exception.ServiceLocatorException;
import com.solution.model.ImageType;
import com.solution.service.ImageTypeService;
import com.solution.util.ServiceLocator;

public class ImageTypeServiceDelegate implements ImageTypeService{

	private ImageTypeService imageTypeService;
	
	public ImageTypeServiceDelegate() throws DelegateException{
		try {
			imageTypeService = (ImageTypeService)ServiceLocator.getInstance().getRemoteService("ImageTypeService");
		}
		catch (ServiceLocatorException e) {
			throw new DelegateException(e); 
		}
	}
	
	public ImageType fetchImageType(Long imageTypeId) throws ServiceBeanException{
		return imageTypeService.fetchImageType(imageTypeId);
	}
}
